Skip to content

Lowercase Docker image repository names in workflows and build.sh - #18

Merged
awnion merged 3 commits into
mainfrom
fix/lowercase-docker-image-name
Nov 30, 2026
Merged

awnion merged 3 commits into
mainfrom
fix/lowercase-docker-image-name

Conversation

@awnion

@awnion awnion commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Fixes #16.

Problem

Docker image repository names must be lowercase, whereas github.repository preserves owner/repository casing (e.g. TaivasJumala/iosevka-nerd-font).

  • .github/workflows/release.yaml still constructed IMAGE: ghcr.io/${{ github.repository }} and passed it directly to docker buildx imagetools create, failing for any owner/repo with uppercase letters.
  • .github/workflows/pr.yaml defined IMAGE: ghcr.io/${{ github.repository }} at workflow scope (only working since 11e50bc because docker/metadata-action@v6 internally lowercases images).
  • build.sh passed IMAGE and IMAGE_REF directly to docker pull and docker run without lowercasing the repository name, so mixed-case values fail docker run (or silently fall back to local builds during docker pull).

Changes

  • .github/workflows/release.yaml: Remove top-level IMAGE and lowercase github.repository before docker buildx imagetools create.
  • .github/workflows/pr.yaml: Remove top-level IMAGE and pass an explicitly lowercased image name to docker/metadata-action@v6.
  • build.sh: Add normalize_image_ref() to lowercase the repository name in both IMAGE and IMAGE_REF while preserving registry ports, tag casing, and digests (compatible with Bash 3.2+).
  • tests/test_build_cache.py: Add unit tests covering mixed-case IMAGE_REF and IMAGE inputs (tags, registry ports, digests, and image IDs).

Verification

  • uv run python -m unittest discover -s tests -v — 12/12 passed
  • /bin/bash -n build.sh and test_build_cache.py under macOS /bin/bash 3.2 — passed
  • Workflow YAML syntax validated for pr.yaml, release.yaml, and fork-release.yaml

Summary by cubic

Fixes #16 by lowercasing Docker image repository names so builds work with mixed-case GitHub owners or repositories.

  • Workflows lowercase github.repository when creating image names.
  • build.sh lowercases repository paths while preserving registry domains, tags, digests, and image IDs.
  • Adds tests for mixed-case image references and registry handling.

Written for commit d322d1e. Summary will update on new commits.

View guided diff Turn on auto-fix

@greptile-apps

greptile-apps Bot commented Nov 30, 2026

Copy link
Copy Markdown

Your organization has run out of review credits. Add credits to resume code reviews.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant WF as GitHub Workflow (pr.yaml/release.yaml)
    participant MA as docker/metadata-action@v6
    participant SH as build.sh
    participant DKR as Docker CLI/daemon
    participant REG as GHCR Registry

    Note over WF,REG: Image reference normalization flow

    alt PR workflow (pr.yaml)
        WF->>WF: NEW: Compute lowercased image name<br/>(tr uppercase->lowercase)
        WF->>MA: Pass lowercased image name
        MA->>MA: Generate tags (sha-xxxxxxx)
        MA-->>WF: Normalized image refs
    else Release workflow (release.yaml)
        WF->>WF: NEW: Compute lowercased IMAGE inline
        WF->>REG: docker buildx imagetools create<br/>with normalized image ref
    end

    Note over SH,DKR: build.sh local build path

    SH->>SH: normalize_image_ref()<br/>NEW: lowercase repo name<br/>preserve tag, digest, port
    SH->>DKR: docker pull (normalized IMAGE_REF)
    alt Pull succeeds
        DKR-->>SH: Image found
        SH->>DKR: docker run (normalized IMAGE_REF)
    else Pull fails
        DKR-->>SH: Not found (silent fallback)
        SH->>SH: Build locally from source
        SH->>DKR: docker run (locally built)
    end

    SH->>SH: Generate output (fonts, iddfile)
    SH-->>WF: Build artifacts
Loading

View guided diff | Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; no actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

This PR lowercases Docker repository paths while keeping registry names, tags, and digests unchanged.

  • The PR and release workflows use lowercase Docker repository names.
  • build.sh lowercases repository paths in Docker image references.

No actionable issues were found. This review used source inspection; tests were not run.

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@awnion
awnion merged commit 327ccb6 into main Nov 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker: invalid reference format: repository name (TaivasJumala/iosevka-nerd-font) must be lowercase

1 participant